export class MailLogger {
  public static info(tag: string, ...params: any) {
    this.colorLog(tag, '36', ...params);
  }

  public static error(tag: string, ...params: any) {
    this.colorLog(tag, '31', ...params);
  }

  public static warn(tag: string, ...params: any) {
    this.colorLog(tag, '33', ...params);
  }

  public static success(tag: string, ...params: any) {
    this.colorLog(tag, '32', ...params);
  }
  private static colorLog(tag: string, color: string, ...params: any) {
    console.log(`\x1b[${color}mMailLogger: ${new Date().toTimeString().split(' ')[0]} ${tag}\x1b[0m`, ...params);
  }
}
